-
-
Notifications
You must be signed in to change notification settings - Fork 624
Custom timeout for delayed event restarts #4921
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Conversation
d056570
to
a4310d8
Compare
a7abdf6
to
fae4ca4
Compare
fae4ca4
to
6e5ca15
Compare
6e5ca15
to
44edf0e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where should I be looking to find the default of 2300 ms?
And hmm, I'm not quite finding this solution elegant. I do like Florian's solution to cover the Element Call SPA case. For the widget case, have we considered setting 2300 ms as an opinionated default for all widget API calls to this endpoint in Element Web?
It would be part of EC. The PR does not yet exist but would be a one line PR to add the config param. |
This has been done in the rust-sdk. https://github.com/matrix-org/matrix-rust-sdk/pull/5413/files |
(alternative to: #4896)
This PR introduces a new setting
delayedEventRestartLocalTimeoutMS
.This setting is used in the context of MatrixRTC. We need to restart the dealyed events to make sure
the HomeServer is sending the delayed rtc leave event. In bad network environments we might end up
waiting for too long for the event to arrive and we will not send another restart event until the local timeout is reached.
In those scenarios chances for success are higher if we use a lower local timeout to increase the tries we do instead of waiting
for responses on requests which are stuck.
It also sets the default value for it to: 2300 which works well.
The reason why we make this a global configuration instead of sth we pass through via the
requestOptions
as it is done in: #4896 is because of how Element Call is implemented.In SPA mode we can control where we send
POST /_matrix/client/v1/delayed_events/{delay_id}
. But in widget mode we cannot configure the exact call to the enpoint. The widget driver will just use the raw function.Delayed event restarts in general are a very cheap server operation. So a smaller timeout in every case seems appropriate.
Checklist
public
/exported
symbols have accurate TSDoc documentation.